package com.delivery.deliverysystem.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.delivery.deliverysystem.common.ServerResponse;
import com.delivery.deliverysystem.exception.RException;
import com.delivery.deliverysystem.pojo.DAO.DeliveryDTO;
import com.delivery.deliverysystem.pojo.DAO.FieldDisplayDTO;
import com.delivery.deliverysystem.pojo.DO.Delivery;
import com.baomidou.mybatisplus.extension.service.IService;
import com.delivery.deliverysystem.pojo.VO.DefaultNameVO;
import com.delivery.deliverysystem.pojo.VO.DeliveryVO;

import java.util.List;

/**
* @author Administrator
* @description 针对表【delivery(送货单表)】的数据库操作Service
* @createDate 2025-01-13 15:37:40
*/
public interface DeliveryService extends IService<Delivery> {

    /**
     * 获取当前用户名
     * @return
     */
    String getCurrentUser();

    /**
     * 送货单增删改查
     * @param deliveryDTO
     * @return
     * @throws Exception
     */
    String addDelivery(DeliveryDTO deliveryDTO) throws Exception;

    boolean updateDelivery(DeliveryDTO deliveryDTO) throws Exception;

    boolean deleteDelivery(String deliveryId);

    DeliveryVO getDeliveryById(String deliveryId);

    //获取当前公司所有的送货单列表
    IPage<Delivery> getDeliveryList(int pageNum, int pageSize) throws RException;

    //获取当天的送货单列表
    List<Delivery> getTodayDeliveryList() throws RException;

    /**
     * 获取当前用户表格工件的显示字段
     * @return
     */
    List<DefaultNameVO> getDisplayField() throws Exception;

    /**
     * 编辑送货单字符显示
     * @param displayField
     * @return
     * @throws Exception
     */
    boolean updateDisplayField(FieldDisplayDTO displayField) throws Exception;

}
